home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 025a / prgmchk.zip / CHK.DOC next >
Text File  |  1991-07-23  |  2KB  |  50 lines

  1.  
  2.                      PARENTHESES AND QUOTES CHECKING ROUTINES
  3.  
  4.                             "Necessity is a mother..."
  5.  
  6.         These two routines were written after a very aggravating session 
  7.         of trying to track down the source of those gut-wrenching RBase 
  8.         error messages like "missing ENDIF, ENDWHILE ...." when you know 
  9.         you're not missing any. Using these EXE routines, you can quickly 
  10.         do a ZIP RETURN ... or ZIP ROLLOUT ... and find the missing quote 
  11.         or parenthesis. 
  12.         
  13.                      ----------------------------------
  14.         
  15.         The PARENCHK routine expects the sets of parentheses to balance 
  16.         by the end of each line unless it's a continued line (ends with 
  17.         the RBase symbol, +).  The output shows the line number and the 
  18.         count of parentheses followed by the actual line where the 
  19.         imbalance has occurred.  The routine also looks for out-of-
  20.         sequence parentheses within a line (ie-when number of closings > 
  21.         number of openings) and tags the location in the output.  The 
  22.         output can get a little messy, particularly while processing a 
  23.         comment block but I think you'll find it useful.
  24.  
  25.         The QUOTECHK routine is similar in concept; it attempts to pair 
  26.         quotation marks on each line.  It also allows for RBase 
  27.         continuation lines before flagging an imbalance.  In this 
  28.         routine, I felt it was best to ignore full comment lines [those 
  29.         starting with *( and ending with ) or starting with --] and also 
  30.         to ignore the SET QUOTE commands.  The routine checks for both 
  31.         single and double quotes. 
  32.  
  33.         The fastest routines were written and compiled in QBASIC by the 
  34.         version 4.0 compiler.  I've also included the BASIC source code 
  35.         to allow you to improve upon my meager coding skills or adapt it 
  36.         to some other brand X software.  For those who dislike ZIPping 
  37.         outside of RBase, I've included much slower versions written in 
  38.         RBase 3.1 command language which perform the same functions. 
  39.         
  40.         A return copy of any improvements would be gratifying (as would 
  41.         be any royalties, honoraria or complementary beers).  
  42.         
  43.  
  44.         William Driskell
  45.         6536 20 Ave NE
  46.         Seattle, Wa 98115
  47.         
  48.  
  49.  
  50.